home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 86
/
(Vol 86) My Disc.iso
/
Games
/
restaurante_1072.swf
/
scripts
/
__Packages
/
Door.as
< prev
next >
Wrap
Text File
|
2009-04-16
|
5KB
|
142 lines
if(true)
{
if(true)
{
§§push(false);
}
if(!§§pop())
{
if(true)
{
if(true)
{
§§push(false);
}
if(!§§pop())
{
if(!_global.Door)
{
var _loc2_ = _global.Door = function($mc)
{
this.fixedList = [0,1,2,3,4,4,5,5,0,1,2,3];
this._mc = $mc;
this.customers = new Array();
this.createCustomer();
this.addInterval = setInterval(this,"createCustomer",this.addDelay);
}.prototype;
_loc2_.__get__customersArray = function()
{
return this.customers;
};
_loc2_.__get__mc = function()
{
return this._mc;
};
_loc2_.__get__isEmpty = function()
{
return this.maxNum <= 0 && this.customers.length <= 0;
};
_loc2_.customerLeave = function(c)
{
var _loc2_ = 0;
while(_loc2_ < this.customers.length)
{
if(this.customers[_loc2_] == c)
{
this.customers.splice(_loc2_,1);
this.refresh();
Mission.getMission().checkEnd();
break;
}
_loc2_ = _loc2_ + 1;
}
};
_loc2_.stopAddCustomer = function()
{
clearInterval(this.addInterval);
};
_loc2_.createCustomer = function()
{
if(this.__get__numCustomers() >= MissionData.DATA[Mission.getMission().__get__id()].listNum)
{
return undefined;
}
if(this.maxNum <= 0)
{
this.stopAddCustomer();
return undefined;
}
this.maxNum = this.maxNum - 1;
var _loc2_ = Mission.current != 0 ? random(6) : this.fixedList.shift();
var _loc5_ = this.__get__mc().attachMovie(CustomerType.__get__TYPES()[_loc2_],CustomerType.__get__TYPES()[_loc2_] + getTimer(),this.__get__mc().getNextHighestDepth(),{_x:0,_y:0});
var _loc4_ = new Customer(_loc5_,_loc2_);
this.customers.push(_loc4_);
this.refresh();
var _loc3_ = new Sound();
_loc3_.attachSound("DoorSnd");
_loc3_.start();
return _loc4_;
};
_loc2_.refresh = function()
{
var _loc2_ = 0;
while(_loc2_ < this.__get__numCustomers())
{
var _loc3_ = Customer(this.customers[_loc2_]);
_loc3_.__get__mc().swapDepths(MissionData.DATA[Mission.getMission().__get__id()].listNum - _loc2_);
if(!_loc3_.__get__isDragging())
{
_loc3_.__get__mc()._x = _loc2_ * -50 + 150;
_loc3_.__get__mc()._y = 0;
}
_loc2_ = _loc2_ + 1;
}
};
_loc2_.reduceCustomer = function(c)
{
var _loc2_ = 0;
while(_loc2_ < this.__get__numCustomers())
{
if(this.customers[_loc2_] == c)
{
this.customers.splice(_loc2_,1);
break;
}
_loc2_ = _loc2_ + 1;
}
this.refresh();
};
_loc2_.__get__numCustomers = function()
{
return this.customers.length;
};
_loc2_._numCustomers = 0;
_loc2_.maxNum = 12;
_loc2_.addDelay = 2000;
§§push(_loc2_.addProperty("customersArray",_loc2_.__get__customersArray,function()
{
}
));
§§push(_loc2_.addProperty("isEmpty",_loc2_.__get__isEmpty,function()
{
}
));
§§push(_loc2_.addProperty("mc",_loc2_.__get__mc,function()
{
}
));
§§push(_loc2_.addProperty("numCustomers",_loc2_.__get__numCustomers,function()
{
}
));
§§push(ASSetPropFlags(_global.Door.prototype,null,1));
}
§§pop();
}
}
§§goto(addr404);
}
gotoAndStop("�J��X�?�N8]�v�������0q�#\f�q�I\t5]Cl�\x18�D<j\\ktE�o�\n�R ɡ>�� ��0K��\x05�x");
}
addr404: